<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
    
        var str01 = "a432fdfsS";

        // 生成正则对象
        var reg01 = new RegExp("^a[a-zA-Z0-9]+S$");

        // {1,} + 

        console.log(reg01.test(str01));
    
        var reg02 = new RegExp("^\w{6,22}&");


        var str03 = "hellohehenihao";

        var reg03 = /\Bhehe/;

        console.log(reg03.test(str03));

      

        var reMail = /^[a-z0-9][\w\.\-]*@[a-z0-9\-]+(\.[a-z]{2,5}){1,2}$/;
    </script>
</head>
<body>
    


</body>
</html>